package c2.advanced.business.help.snapshot;

import c2.advanced.business.base.AdvancedDaoTemplate;
import c2.advanced.share.DbFacade;
import c2.cross.business.help.snapshot.CrossSnapshotData;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("跨服快照数据DAO")
public class CrossSnapshotDao extends AdvancedDaoTemplate {
    @NoteField("DB文档名")
    public static final String COLLECTION = "cross-snapshot";

    public CrossSnapshotDao(DbFacade root) {
        super(root);
    }

    public CrossSnapshotData get(String uid) {
        return mongo().findById(uid, CrossSnapshotData.class, COLLECTION);
    }

    public void save(CrossSnapshotData data) {
        mongo().save(data, COLLECTION);
    }
}
